ostree --repo=sysroot/ostree/repo remote add --set=gpg-verify=false testos file://$(pwd)/testos-repo
ostree --repo=sysroot/ostree/repo pull testos testos/buildmaster/x86_64-runtime
ostree admin --sysroot=sysroot deploy --karg=root=LABEL=MOO --karg=quiet --os=testos testos:testos/buildmaster/x86_64-runtime
-assert_not_has_file sysroot/ostree/deploy/testos/current/usr/include/foo.h
+newrev=$(ostree --repo=sysroot/ostree/repo rev-parse testos:testos/buildmaster/x86_64-runtime)
+assert_not_has_file sysroot/ostree/deploy/testos/deploy/$newrev.0/usr/include/foo.h
if ostree admin --sysroot=sysroot switch --os=testos testos/buildmaster/x86_64-runtime; then
assert_not_reached "Switch to same ref unexpectedly succeeded"
fi
echo "ok switch expected error"
ostree admin --sysroot=sysroot switch --os=testos testos/buildmaster/x86_64-devel
-assert_file_has_content sysroot/ostree/deploy/testos/current/usr/include/foo.h 'header'
+newrev=$(ostree --repo=sysroot/ostree/repo rev-parse testos:testos/buildmaster/x86_64-devel)
+assert_file_has_content sysroot/ostree/deploy/testos/deploy/$newrev.0/usr/include/foo.h 'header'
echo "ok switch"